﻿// //  ********************************************************************************
// //  Copyright (C) 2016 Sebastian Kenter. All rights reserved.
// // 
// //  Name    : PhotonServerProject | PhotonServerCommon | AccountTMap.cs
// //  Created : 2016 - 04 - 07 16:45
// //  Modified: 2016 - 04 - 18 09:38
// //  ********************************************************************************

using FluentNHibernate.Mapping;
using PhotonServerCommon.Entities.Domain;

namespace PhotonServerCommon.Entities.Mapping
{
    public class AccountTMap : ClassMap<AccountT>
    {
        public AccountTMap()
        {
            Schema("mseauth");
            Table("account_t");
            Id(x => x.AccountId).GeneratedBy.Assigned().Column("AccountId");
            Map(x => x.AccountName).Column("AccountName").Not.Nullable();
            Map(x => x.DzIns).Column("DzIns").Not.Nullable();
            Map(x => x.DzUpd).Column("DzUpd").Not.Nullable();
            Map(x => x.Email).Column("Email").Not.Nullable();
            Map(x => x.GivenName).Column("GivenName").Not.Nullable();
            Map(x => x.Language).Column("Language").Not.Nullable();
            Map(x => x.LoginFailures).Column("LoginFailures").Not.Nullable();
            Map(x => x.NamUpd).Column("NamUpd").Not.Nullable();
            Map(x => x.PasswordHash).Column("PasswordHash").Not.Nullable();
            Map(x => x.Region).Column("Region").Not.Nullable();
            Map(x => x.RemoteIp).Column("RemoteIp").Not.Nullable();
            Map(x => x.Salt).Column("Salt").Not.Nullable();
            Map(x => x.Surname).Column("Surname").Not.Nullable();
            Map(x => x.Tsn).Column("Tsn").Not.Nullable();
            Map(x => x.Banned).Column("Banned");
            Map(x => x.LoggedIn).Column("LoggedIn");
            Map(x => x.ClientPeerId).Column("ClientPeerId").Not.Nullable();
        }
    }
}
